#include "TextBox.h"

bool TextBox::Init(RECT a_pos)
{
	iType = TEXTBOX;
	m_Text << "Nothing";

	m_rLocation = a_pos;

	return true;
}

bool TextBox::Init()
{
	RECT tempRect;
	tempRect.left = 0;
	tempRect.top =  0;
	tempRect.right = 40;
	tempRect.bottom = 60;

	Init(tempRect);

	return true;
}

void TextBox::AppendText(char* moreText)
{
	m_Text << moreText;
	m_rLocation.right = m_rLocation.left + (m_Text.str().size() * 10);	// resize horizontally
}

void TextBox::ChangeText(char* newText)
{
	m_Text.str("");			// clear the old text
	AppendText(newText);
}